package com.itheima.reggie.common;

import com.itheima.reggie.domain.User;


public class UserHolder {
    private static ThreadLocal<User>threadLocal = new ThreadLocal<>();
    //放入user
    public static void set(User user){
        threadLocal.set(user);
    }
    //获取user
    public static User get(){
        return threadLocal.get();

    }
    //移除
    public static void remove(){
        threadLocal.remove();
    }
}
